package FilesGenerator

/**
 * Created by IntelliJ IDEA.
 * User: romaincherix
 * Date: 13.04.11
 * Time: 13:30
 * To change this template use File | Settings | File Templates.
 */

object ProguardGen  {

  // proguard without optimizations
  def getDefaultConfig:String={
     var value = "@HEADER@\n\n@INJARS@\n@OUTJARS@\n@LIBRARYJARS@\n\n-dontobfuscate\n-dontoptimize\n-dontpreverify\n\n-dontskipnonpubliclibraryclasses\n-dontskipnonpubliclibraryclassmembers\n\n-dontwarn\n\n#scala.Enumeration accesses a field 'MODULE$' dynamically\n-dontnote scala.Enumeration\n\n#(org.xml.sax.EntityResolver)Class.forName(variable).newInstance()\n-dontnote org.xml.sax.EntityResolver\n\n#(org.apache.james.mime4j.storage.StorageProvider)Class.forName(variable).newInstance()\n-dontnote org.apache.james.mime4j.storage.DefaultStorageProvider\n\n-keepattributes Exceptions,InnerClasses,Signature,Deprecated,\n                SourceFile,LineNumberTable,*Annotation*,EnclosingMethod\n\n-keep public class @MYAPP_PACKAGE@\n\n-keepclassmembers class * implements java.io.Serializable {\n    static final long serialVersionUID;\n    private static final java.io.ObjectStreamField[] serialPersistentFields;\n    !static !transient <fields>;\n    private void writeObject(java.io.ObjectOutputStream);\n    private void readObject(java.io.ObjectInputStream);\n    java.lang.Object writeReplace();\n    java.lang.Object readResolve();\n}\n\n#essai pour scala\n-keepclassmembers class * extends java.io.Serializable {\n    static final long serialVersionUID;\n    private static final java.io.ObjectStreamField[] serialPersistentFields;\n    !static !transient <fields>;\n    private void writeObject(java.io.ObjectOutputStream);\n    private void readObject(java.io.ObjectInputStream);\n    java.lang.Object writeReplace();\n    java.lang.Object readResolve();\n}"
    value
  }

  // proguard with all optimizations
  def getReleaseConfig:String={
     var value = "@HEADER@\n\n@INJARS@\n@OUTJARS@\n@LIBRARYJARS@\n\n-optimizationpasses 4\n-overloadaggressively\n-repackageclasses ''\n-allowaccessmodification\n-optimizations !code/simplification/arithmetic, !method/propagation/*\n\n-dontskipnonpubliclibraryclasses\n-dontskipnonpubliclibraryclassmembers\n\n-dontwarn\n\n#scala.Enumeration accesses a field 'MODULE$' dynamically\n-dontnote scala.Enumeration\n\n#(org.xml.sax.EntityResolver)Class.forName(variable).newInstance()\n-dontnote org.xml.sax.EntityResolver\n\n#(org.apache.james.mime4j.storage.StorageProvider)Class.forName(variable).newInstance()\n-dontnote org.apache.james.mime4j.storage.DefaultStorageProvider\n\n-keepattributes Exceptions,InnerClasses,Signature,Deprecated,\n                SourceFile,LineNumberTable,*Annotation*,EnclosingMethod\n\n-keep public class @MYAPP_PACKAGE@\n\n-keepclassmembers class * implements java.io.Serializable {\n    static final long serialVersionUID;\n    private static final java.io.ObjectStreamField[] serialPersistentFields;\n    !static !transient <fields>;\n    private void writeObject(java.io.ObjectOutputStream);\n    private void readObject(java.io.ObjectInputStream);\n    java.lang.Object writeReplace();\n    java.lang.Object readResolve();\n}\n\n#essai pour scala\n-keepclassmembers class * extends java.io.Serializable {\n    static final long serialVersionUID;\n    private static final java.io.ObjectStreamField[] serialPersistentFields;\n    !static !transient <fields>;\n    private void writeObject(java.io.ObjectOutputStream);\n    private void readObject(java.io.ObjectInputStream);\n    java.lang.Object writeReplace();\n    java.lang.Object readResolve();\n}"
    value
  }
}